$nids = \Drupal::entityQuery('node')->condition('type','my_custom_type')->execute(); $nodes = \Drupal\node\Entity\Node::loadMultiple($nids);